<template>
    <div id="background">
        <el-container style="height:100%;">
           <!-- <el-header id="shouCangHead">
               <img class="scIcon" src="../../assets/img/mine/back.png" @click="back">
               <span class="scHead">收藏</span>
           </el-header> -->
           <el-header id="shouCangHeadPosition">
                <el-row type="flex" style="height:80%;display:flex;align-items: flex-end">
                    <el-col :xs="2" :sm="2" :md="2" :offset="1" class="imgCol">
                        <img v-bind:src="backIcon" class="backSize" @click="back" />
                    </el-col>
                    <el-col :xs="6" :sm="6" :md="6" :offset="6" class="imgCol">
                        <span class="titleSize">我的收藏</span>
                    </el-col>
                </el-row>
            </el-header>

           <el-main id="shouCangMain">
                <div class="scBox" v-for="(value,key) in object" :key="key">
                    
                    <el-row class="scItem">
                        <el-col class="scCol1">
                            <span><img class="scTouXiang" src="../../assets/img/mine/touxiang.jpg"></span>
                        </el-col>
                        <el-col class="scCol2">
                            <span class="scName">{{value.name}}</span>
                            <span class="scDate">{{value.date}}</span>
                            <span><img class="scKuang" src="../../assets/img/mine/sckuang.png"></span>
                        </el-col>
                    </el-row>
                    <el-divider></el-divider>
                </div>
           </el-main>
        </el-container>
    </div>
</template>

<script>
import backIcon from '../../assets/img/mine/back.png'
export default {

    data() {
        return{
            backIcon:backIcon,
            normalHeight:document.documentElement.clientHeight,
            object:[
                {
                    name:'孟老师',
                    date:'2019-6-15',
                    content:'收藏内容1',
                },{
                    name:'孟老师',
                    date:'2019-6-12',
                    content:'收藏内容2',
                },{
                    name:'童',
                    date:'2019-6-10',
                    content:'收藏内容3',
                },{
                    name:'张三',
                    date:'2019-6-10',
                    content:'收藏内容4'

                },{
                    name:'李四',
                    date:'2019-6-5',
                    content:'收藏内容5'
                },{
                    name:'李四',
                    date:'2019-6-4',
                    content:'收藏内容'

                },
            ]

        }

    },
     mounted(){
        var bg = document.getElementById("background");
       // this.normalHeight=document.documentElement.clientHeight;
        console.log("height:"+this.normalHeight);
        bg.style.height = this.normalHeight+"px";
        bg.style.backgroundColor = "#FFFFFF"
        bg.style.margin = "0px";

        var head=document.getElementById("shouCangHeadPosition");
        var headHeight=this.normalHeight/30 *4 ;
        console.log("headHeight:"+headHeight);
        head.style.height=headHeight+"px";

        var main=document.getElementById("shouCangMain");
        var mainHeight=this.normalHeight/30 *24 ;
        main.style.height=mainHeight+"px";
    },
    methods:{
        back(){
            console.log("back:");
            this.$router.go(-1);
        },
    }
    
}
</script>

<style>
#shouCangHeadPosition {
  background-color: #53cdf5;
}
.backSize{
    height: 26px;
}
.titleSize{
    font-size:1.125em;
    color:#ffffff
}
@media screen and (max-height: 600px){
  .backSize{
      height: 22px;
  }
  .titleSize{
      font-size: 1em;
  }
}

#shouCangMain{
    padding: 14px;
    background: #FFFFFF;
}
.scName{
    font-size: 14px;
    color: #707070;
}
.scDate{
    position:absolute;
    right:15px;
    font-size: 14px;
    color: #707070;
}
.scKuang{
    height: 40%;
    width:95%;
    margin-top: 8px;
}
.scItem{
    height:fit-content;
}
.scCol2{
    width:80%;
}
.scCol1{
    width:20%;
}
.scTouXiang{
    width:50px;
    height:50px;
    border-radius: 50%;
    float:left;
}

/* #shouCangHead{
    background-color: #53cdf5 !important;
    height: 45px;
    text-align: center;
    line-height: 60px;
    color: #FFFFFF;
    width: 100%;
}
.scIcon{
    position: relative;
    top:40%;
    float:left;
    width:30px;
    height:30px;
}
.scHead{
    position: relative;
    top:15%;
    right: 8px;
    font-size: 20px;
} */

</style>
